<template>
	<view class="content">
		<view class="titleInfo">
			<view class="title">{{articleInfo.title}}</view>
			<view class="articleShow flex">
				<view class="flex">
					<view class="count">
						{{articleInfo.show_count}}
					</view>
					<view>浏览</view>
				</view>
				<view class="time">{{articleInfo.createtime}}</view>
			</view>
		</view>
		<view v-html="articleInfo.content"></view>
	</view>
</template>

<script>
	import http from '@/apis/http.js'
	export default {
		data() {
			return {
				articleInfo : {},
				articleId : 0,
			}
		},
		methods: {
			getArticleInfo(){
				http.POST('article/info',{'articleId':this.articleId}).then(res=>{
					if(res.code == 1){
						this.articleInfo = res.data
		
					}else{
						uni.showToast({
							'title':res.msg,
							'icon':'none'
						})
					}
				})
			}
		},
		onLoad(option) {
			this.articleId = option.articleId
			this.getArticleInfo()
		}
	}
</script>

<style>
	.flex{display: flex;}
	.content{padding: 0 20rpx;}
	.titleInfo{margin-bottom: 30rpx;;}
	.title { font-weight: bold; margin: 20rpx 0; font-size: 40rpx;;}
	.time{margin-left: 70rpx;}
	.articleShow{font-size: 22rpx; color: #999999;}
	.count { font-weight: bold; margin-right: 5rpx; color: #232428;}
</style>
